//
//  LoginCheckTask.m
//  iphone.mobileoa
//
//  Created by 李亚春 on 13-5-22.
//  Copyright (c) 2013年 Epoint. All rights reserved.
//

#import "LoginCheckTask.h"
#import "WebServiceHelper.h"

@implementation LoginCheckTask

-(void)execute
{
    NSString *ValidateData = [self.params objectForKey:@"ValidateData"];
    NSString *url = [self.params objectForKey:@"url"];
    NSString *wsNamespace = [self.params objectForKey:@"namespace"];
    NSString *loginid = [self.params objectForKey:@"loginid"];
    NSString *password = [self.params objectForKey:@"password"];
    
    NSString *ParasXml = [NSString stringWithFormat:@"&lt;?xml version=\"1.0\" encoding=\"gb2312\"?&gt;&lt;paras&gt;&lt;LoginID&gt;%@&lt;/LoginID&gt;&lt;Password&gt;%@&lt;/Password&gt;&lt;/paras&gt;",loginid,password];
    WebServiceHelper *webserviceHelper = [[WebServiceHelper alloc]initWebServiceWithUrl:url wsNamespace:wsNamespace method:@"UserLogin"];
    [webserviceHelper addParameterForString:@"ValidateData" value:ValidateData];
    [webserviceHelper addParameterForString:@"ParasXml" value:ParasXml];
    [self sendDataRefreshUI:webserviceHelper.start];
}

@end
